Skip to content

Conversation

shaun-nx
Copy link
Contributor

@shaun-nx shaun-nx commented Oct 7, 2025

Proposed changes

This change adds a new workflow file, openshift-certification.yml which is responsible for validating that our UBI based images of NGF, NGINX OSS, and NGF Operator will pass the RedHad certification process.

This workflow uses RedHat Openshift Preflight tool to pre-certify images before they are published:
https://github.com/redhat-openshift-ecosystem/openshift-preflight

Closes #3909

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.


Copy link

codecov bot commented Oct 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.80%. Comparing base (a5c2d8c) to head (ce3f4c6).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4035      +/-   ##
==========================================
- Coverage   86.83%   86.80%   -0.04%     
==========================================
  Files         128      128              
  Lines       16607    16607              
  Branches       62       62              
==========================================
- Hits        14421    14415       -6     
- Misses       2004     2009       +5     
- Partials      182      183       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

openshift-certification:
name: OpenShift Certification
needs: [build-oss, build-plus, build-operator]
if: ${{ inputs.dry_run || false }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this isn't pushing anything don't need the dry run condition

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, it also doesn't need to run on every build - maybe only on merges to main and releases

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Just while testing, I'm going to have it run on pull requests as well for this PR.

So it will look like this:

openshift-certification:
  name: OpenShift Certification
  needs: [build-oss, build-plus, build-operator]
  if: >
    ${{ github.event_name == 'pull_request'
    && github.event.pull_request.base.ref == 'main'
    || (github.event_name == 'push' && github.ref == 'refs/heads/main')
    || (inputs.is_production_release == true)
    }}
  uses: ./.github/workflows/openshift-certification.yml
  with:
    runner: ubuntu-24.04
  permissions:
    contents: read
    packages: read
  secrets: inherit

- name: Run preflight for NGINX Gateway Fabric
env:
PYXIS_API_TOKEN: ${{ secrets.PYXIS_API_TOKEN }}
run: preflight check container ghcr.io/nginx/nginx-gateway-fabric:edge-ubi --json > ngf-preflight-result.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the images being tested reflect what was built in this run instead of hardcoding to edge?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, I added these more to test the pipeline in general. I'll make sure those get updated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ciarams87 this should be updated now.

The current approach we're going with is to save the images tagged in the build stage, upload them as artifacts, and then download those for use by the preflight tool.

@shaun-nx shaun-nx marked this pull request as ready for review October 8, 2025 09:47
@shaun-nx shaun-nx requested a review from a team as a code owner October 8, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

Set up Red Hat container certification testing pipeline
2 participants